package com.homedo.microservice.open.service.gateway.bean.enums.forzuulfilterdefault;

import java.util.HashMap;
import java.util.Map;


/**
 * 
 * @author 作者 jgshun
 * @date   创建时间 2018年09月14日 14时56分00秒
 */
public enum ProgressEnum4ZuulFilterDefault {
		/**
		 * (short) -1, "未发布"
		 */
		 	UNPUBLISHED((short) -1, "未发布"),
		/**
		 * (short) 2, "灰度"
		 */
		 	CANARY((short) 2, "灰度"),
		/**
		 * (short) 1, "发布中"
		 */
		 	PUBLISHED((short) 1, "发布中");

	private short code;
	private String msg;

	private ProgressEnum4ZuulFilterDefault(short code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public short getCode() {
		return code;
	}

	public void setCode(short code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	
	public static ProgressEnum4ZuulFilterDefault getProgressEnumByCode(short code) {
		for (ProgressEnum4ZuulFilterDefault _enum : ProgressEnum4ZuulFilterDefault.values()) {
			if (_enum.getCode() == code) {
				return _enum;
			}
		}
		return null;
	}
}
